/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package reflection;

import java.net.URL;
import java.net.URLClassLoader;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
 *
 * @author Nguyen Minh Tan
 */
public class LoadClassFromSystemDisk {

    public LoadClassFromSystemDisk() {
        try {
            URL myurl[] = {new URL("file:///G:/NetBeansProjects/J2SE/LearnJava/data/")};
            URLClassLoader loader = new URLClassLoader(myurl);
            Class c = loader.loadClass("HelloClass");
            c.newInstance();
        } catch (Exception ex) {
            Logger.getLogger(LoadClassFromSystemDisk.class.getName()).log(Level.SEVERE, null, ex);
        }
    }
    /*
    public static void main(String args[]){
        new LoadClassFromSystemDisk();
    }
     * **/
}
